oracle.pgx.api

## Class PgxMap<K extends Comparable<K>,V extends Comparable<V>>

- java.lang.Object
- - oracle.pgx.api.Destroyable
  - - oracle.pgx.api.PgxManagedObject
    - - oracle.pgx.api.PgxMap<K,V>

- Type Parameters:
    `K` - the key type
    `V` - the value type
  All Implemented Interfaces:
    AutoCloseable

      public class PgxMap<K extends Comparable<K>,V extends Comparable<V>>
      extends PgxManagedObject

  A map is a collection of key-value pairs.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `containsKey(K key)` Blocking version of `#containsKeyAsync()`.
    `PgxFuture<Boolean>` | `containsKeyAsync(K key)` Checks if the map contains key.
    `Iterable<Map.Entry<K,V>>` | `entries()` Blocking version of `entriesAsync()`.
    `PgxFuture<Iterable<Map.Entry<K,V>>>` | `entriesAsync()` Gets an entry set.
    `V` | `get(K key)` Blocking version of `#getAsync()`.
    `PgxFuture<V>` | `getAsync(K key)` Gets the value of a key.
    `PgxGraph` | `getGraph()` Gets the PgxGraph this map is bound to.
    `PropertyType` | `getKeyType()` Gets the key type.
    `String` | `getName()`
    `MapType` | `getType()` Gets the map type.
    `PropertyType` | `getValueType()` Gets the value type.
    `Iterable<K>` | `keys()` Blocking version of `keysAsync()`.
    `PgxFuture<Iterable<K>>` | `keysAsync()`
    `boolean` | `remove(K key)` Blocking version of `#removeAsync()`.
    `PgxFuture<Boolean>` | `removeAsync(K key)` Removes the entry specified by the given key from the map with the given name.
    `void` | `set(K key, V value)` Blocking version of `#setAsync()`.
    `PgxFuture<Void>` | `setAsync(K key, V value)` Sets the value for a key in the map specified by the given name.
    `int` | `size()` Blocking version of `sizeAsync()`.
    `PgxFuture<Integer>` | `sizeAsync()` Returns the size of the map
    `String` | `toString()`

    - ### Methods inherited from class oracle.pgx.api.PgxManagedObject

      `equals, hashCode`

    - ### Methods inherited from class oracle.pgx.api.Destroyable

      `close, destroy, destroyAsync`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### containsKey

          @Generated(value="src/python/synchronize.py")
          public boolean containsKey(K key)
                              throws ExecutionException,
                                     InterruptedException

      Blocking version of `#containsKeyAsync()`. Calls `#containsKeyAsync()` and waits for the returned `PgxFuture` to complete.
      Throws:
        `InterruptedException` - if the caller thread gets interrupted while waiting for completion.
        `ExecutionException` - if any exception occurred during asynchronous execution. The actual exception will be nested.

    - #### containsKeyAsync

          public PgxFuture<Boolean> containsKeyAsync(K key)

      Checks if the map contains key.
      Parameters:
        `key` - the key
      Returns:
        the pgx future

    - #### entries

          @Generated(value="src/python/synchronize.py")
          public Iterable<Map.Entry<K,V>> entries()
                                                                                       throws ExecutionException,
                                                                                              InterruptedException

      Blocking version of `entriesAsync()`. Calls `entriesAsync()` and waits for the returned `PgxFuture` to complete.
      Throws:
        `InterruptedException` - if the caller thread gets interrupted while waiting for completion.
        `ExecutionException` - if any exception occurred during asynchronous execution. The actual exception will be nested.

    - #### entriesAsync

          public PgxFuture<Iterable<Map.Entry<K,V>>> entriesAsync()

      Gets an entry set.
      Returns:
        an iterable of the entry set

    - #### get

          @Generated(value="src/python/synchronize.py")
          public V get(K key)
                                      throws ExecutionException,
                                             InterruptedException

      Blocking version of `#getAsync()`. Calls `#getAsync()` and waits for the returned `PgxFuture` to complete.
      Throws:
        `InterruptedException` - if the caller thread gets interrupted while waiting for completion.
        `ExecutionException` - if any exception occurred during asynchronous execution. The actual exception will be nested.

    - #### getAsync

          public PgxFuture<V> getAsync(K key)

      Gets the value of a key.
      Parameters:
        `key` -
      Returns:
        value

    - #### getGraph

          public PgxGraph getGraph()

      Gets the PgxGraph this map is bound to.
      Returns:
        graph

    - #### getKeyType

          public PropertyType getKeyType()

      Gets the key type.
      Returns:
        the key type

    - #### getName

          public String getName()

      Specified by:
        `getName` in class `PgxManagedObject`
      Returns:
        the name identifying this managed object

    - #### getType

          public MapType getType()

      Gets the map type.
      Returns:
        the map type

    - #### getValueType

          public PropertyType getValueType()

      Gets the value type.
      Returns:
        the value type

    - #### keys

          @Generated(value="src/python/synchronize.py")
          public Iterable<K> keys()
                                                 throws ExecutionException,
                                                        InterruptedException

      Blocking version of `keysAsync()`. Calls `keysAsync()` and waits for the returned `PgxFuture` to complete.
      Throws:
        `InterruptedException` - if the caller thread gets interrupted while waiting for completion.
        `ExecutionException` - if any exception occurred during asynchronous execution. The actual exception will be nested.

    - #### keysAsync

          public PgxFuture<Iterable<K>> keysAsync()

    - #### remove

          @Generated(value="src/python/synchronize.py")
          public boolean remove(K key)
                         throws ExecutionException,
                                InterruptedException

      Blocking version of `#removeAsync()`. Calls `#removeAsync()` and waits for the returned `PgxFuture` to complete.
      Throws:
        `InterruptedException` - if the caller thread gets interrupted while waiting for completion.
        `ExecutionException` - if any exception occurred during asynchronous execution. The actual exception will be nested.

    - #### removeAsync

          public PgxFuture<Boolean> removeAsync(K key)

      Removes the entry specified by the given key from the map with the given name. Returns true if the map did contain an entry with the given key, false otherwise.
      Parameters:
        `key` - key of the entry in the map to be removed.
      Returns:
        true if the map contained the key.

    - #### set

          @Generated(value="src/python/synchronize.py")
          public void set(K key,
                                V value)
                   throws ExecutionException,
                          InterruptedException

      Blocking version of `#setAsync()`. Calls `#setAsync()` and waits for the returned `PgxFuture` to complete.
      Throws:
        `InterruptedException` - if the caller thread gets interrupted while waiting for completion.
        `ExecutionException` - if any exception occurred during asynchronous execution. The actual exception will be nested.

    - #### setAsync

          public PgxFuture<Void> setAsync(K key,
                                 V value)

      Sets the value for a key in the map specified by the given name. Returns the old value for the given key or null if there was no entry for this key before.
      Parameters:
        `key` - key of the entry
        `value` - new value
      Returns:
        old value for the key or null if there was no entry before

    - #### size

          @Generated(value="src/python/synchronize.py")
          public int size()
                   throws ExecutionException,
                          InterruptedException

      Blocking version of `sizeAsync()`. Calls `sizeAsync()` and waits for the returned `PgxFuture` to complete.
      Throws:
        `InterruptedException` - if the caller thread gets interrupted while waiting for completion.
        `ExecutionException` - if any exception occurred during asynchronous execution. The actual exception will be nested.

    - #### sizeAsync

          public PgxFuture<Integer> sizeAsync()

      Returns the size of the map
      Returns:
        size

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `PgxManagedObject`

Copyright © 2015. All rights reserved.